home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / python-support / python2.6 / gnome_sudoku / defaults.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  2.9 KB  |  64 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import sys
  5. import os
  6. import os.path as os
  7. import errno
  8. import gettext
  9. root_dir = os.path.dirname(os.path.dirname(__file__))
  10. if not os.path.exists(os.path.join(root_dir, 'Makefile.am')):
  11.     APP_DATA_DIR = os.path.join('/usr', 'share')
  12.     IMAGE_DIR = os.path.join(APP_DATA_DIR, 'pixmaps', 'gnome-sudoku')
  13.     LOCALEDIR = os.path.join(APP_DATA_DIR, 'locale')
  14.     GLADE_DIR = os.path.join(APP_DATA_DIR, 'gnome-sudoku')
  15.     BASE_DIR = os.path.join(APP_DATA_DIR, 'gnome-sudoku')
  16.     PUZZLE_DIR = os.path.join(APP_DATA_DIR, 'gnome-sudoku', 'puzzles')
  17. else:
  18.     sys.path.insert(0, os.path.abspath(root_dir))
  19.     APP_DATA_DIR = os.path.join(root_dir, '../data')
  20.     IMAGE_DIR = os.path.join(root_dir, '../images')
  21.     LOCALEDIR = os.path.join(APP_DATA_DIR, 'locale')
  22.     GLADE_DIR = os.path.join(root_dir, '../glade')
  23.     BASE_DIR = os.path.join(root_dir, '../data')
  24.     PUZZLE_DIR = BASE_DIR
  25. DOMAIN = 'gnome-games'
  26. gettext.bindtextdomain(DOMAIN, LOCALEDIR)
  27. gettext.textdomain(DOMAIN)
  28. from gettext import gettext as _
  29. import gtk.glade as gtk
  30. gtk.glade.bindtextdomain(DOMAIN, LOCALEDIR)
  31. gtk.glade.textdomain(DOMAIN)
  32. VERSION = '2.26.1'
  33. APPNAME = _('GNOME Sudoku')
  34. APPNAME_SHORT = _('Sudoku')
  35. COPYRIGHT = 'Copyright \xc2\xa9 2005-2008, Thomas M. Hinkle'
  36. DESCRIPTION = _('GNOME Sudoku is a simple sudoku generator and player. Sudoku is a japanese logic puzzle.\n\nGNOME Sudoku is a part of GNOME Games.')
  37. AUTHORS = [
  38.     'Thomas M. Hinkle']
  39. WEBSITE = 'http://www.gnome.org/projects/gnome-games/'
  40. WEBSITE_LABEL = _('GNOME Games web site')
  41. AUTO_SAVE = True
  42. MIN_NEW_PUZZLES = 90
  43. LICENSE = [
  44.     _('%s is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.').replace('%s', APPNAME),
  45.     _('%s is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.').replace('%s', APPNAME),
  46.     _('You should have received a copy of the GNU General Public License along with %s; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA').replace('%s', APPNAME)]
  47. DATA_DIR = os.path.expanduser('~/.gnome2/gnome-sudoku/')
  48.  
  49. def initialize_games_dir():
  50.     
  51.     try:
  52.         os.makedirs(DATA_DIR)
  53.     except OSError:
  54.         e = None
  55.         if e.errno != errno.EEXIST:
  56.             print _('Unable to make data directory %(dir)s: %(error)s') % {
  57.                 'dir': DATA_DIR,
  58.                 'error': e.strerror }
  59.         
  60.     except:
  61.         e.errno != errno.EEXIST
  62.  
  63.  
  64.